-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a way to enrich dependencies logs with context at the beginning of api call #1624
Conversation
…tionInsights-JS into lxiao/request-callback
Thanks for these changes. Is there a way to access request body as part of xhr? We have single endpoint for all the dependency calls (API), but the request body has the specific method name. Currently, AI log shows single operation name and we are not able to figure out the actual method until we look at end-to-end transaction. If there is a way, we want to get the method name from request body and append it to the operation name before sending the telemetry. Thank you |
Sorry for the delay as I've been away. I just went through the code and I can't see a current way to directly access the send body of the request. Another possible way (as you own the backend) would be to return a response header with the extra information that you want to include and then in the addRequestContext() you |
Thank you for the suggestions. I am sorry for the delay in updating here. I went with second option as I just needed a operation name and I have full control on back-end. Thank you once again for your time and looking into my request/question. |
Related Issue: How to enrich dependencies logs with context at the beginning of api call? #1561
Update:
The basic usage would be adding configurations when AI gets initialized:
And in the payload, you'll find the specified dimensions are captured in properties field:
eg. Fetch
eg. Ajax